Optimal. Leaf size=54 \[ \frac{i a \sec ^3(c+d x)}{3 d}+\frac{a \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac{a \tan (c+d x) \sec (c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0352547, antiderivative size = 54, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.136, Rules used = {3486, 3768, 3770} \[ \frac{i a \sec ^3(c+d x)}{3 d}+\frac{a \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac{a \tan (c+d x) \sec (c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3486
Rule 3768
Rule 3770
Rubi steps
\begin{align*} \int \sec ^3(c+d x) (a+i a \tan (c+d x)) \, dx &=\frac{i a \sec ^3(c+d x)}{3 d}+a \int \sec ^3(c+d x) \, dx\\ &=\frac{i a \sec ^3(c+d x)}{3 d}+\frac{a \sec (c+d x) \tan (c+d x)}{2 d}+\frac{1}{2} a \int \sec (c+d x) \, dx\\ &=\frac{a \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac{i a \sec ^3(c+d x)}{3 d}+\frac{a \sec (c+d x) \tan (c+d x)}{2 d}\\ \end{align*}
Mathematica [A] time = 0.0129146, size = 54, normalized size = 1. \[ \frac{i a \sec ^3(c+d x)}{3 d}+\frac{a \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac{a \tan (c+d x) \sec (c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.081, size = 55, normalized size = 1. \begin{align*}{\frac{{\frac{i}{3}}a}{d \left ( \cos \left ( dx+c \right ) \right ) ^{3}}}+{\frac{a\sec \left ( dx+c \right ) \tan \left ( dx+c \right ) }{2\,d}}+{\frac{a\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{2\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.11126, size = 82, normalized size = 1.52 \begin{align*} -\frac{3 \, a{\left (\frac{2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - \frac{4 i \, a}{\cos \left (d x + c\right )^{3}}}{12 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.11928, size = 520, normalized size = 9.63 \begin{align*} \frac{-6 i \, a e^{\left (5 i \, d x + 5 i \, c\right )} + 16 i \, a e^{\left (3 i \, d x + 3 i \, c\right )} + 6 i \, a e^{\left (i \, d x + i \, c\right )} + 3 \,{\left (a e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, a e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, a e^{\left (2 i \, d x + 2 i \, c\right )} + a\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - 3 \,{\left (a e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, a e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, a e^{\left (2 i \, d x + 2 i \, c\right )} + a\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right )}{6 \,{\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} a \left (\int i \tan{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int \sec ^{3}{\left (c + d x \right )}\, dx\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.18881, size = 134, normalized size = 2.48 \begin{align*} \frac{3 \, a \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, a \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) + \frac{2 \,{\left (3 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} - 6 i \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 3 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 2 i \, a\right )}}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )}^{3}}}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]